package com.xiaoxiong.mami.utils;



import java.util.UUID;

public class UUIDUtils {

    //mami-用户前缀
    public static String mamiPrefix = "MAMI_";

    /**
     * 创建用户id
     *
     * @return the new UUID
     */
    public static String createUserId() {
        String uuidString = mamiPrefix + createUUID();
        return uuidString;
    }

    /**
     * 创建32位大写UUID
     *
     * @return
     */
    public static String createUUID() {
        String uuid = UUID.randomUUID().toString().trim().replaceAll("-", "");
        return uuid.toUpperCase();
    }

    public static String makeToken() {
        String token = UUID.randomUUID().toString().trim().replaceAll("-", "");
        return token.toUpperCase();
    }


}
